home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / blitz-list200994.lha / blitz-list / 000089_blitz-list-request_Thu Jul 21 19:50:13 1994.msg < prev    next >
Internet Message Format  |  1994-09-20  |  2KB

  1. Received: from sashimi.wwa.com (sashimi.wwa.com [198.49.174.1]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id TAA19789 for <blitz-list@helsinki.fi>; Thu, 21 Jul 1994 19:49:55 +0300
  2. Received: by sashimi.wwa.com (Smail3.1.28.1 #8)
  3.     id m0qR1Km-000bmKC; Thu, 21 Jul 94 11:51 CDT
  4. Received: by alpha.IXO.COM (V1.17-beta/Amiga)
  5.       id <0ueg@alpha.IXO.COM>; Thu, 21 Jul 94 17:17:49 CET
  6. Message-ID: <F226EB91@alpha.ixo.com>
  7. Date: 21 Jul 94 12:15:49 CET
  8. Organization: Alpha Station BBS - 011/333528, Diepenbeek, BELGIUM
  9. X-Mailer: AmiGate 0.17e (27.6.94)
  10. From: stef@alpha.IXO.COM (Stephan Kortleven)
  11. To: blitz-list@helsinki.fi
  12. Subject: Re: Are numbers REAL?
  13. MIME-Version: 1.0
  14. Content-Type: text/plain; charset="us-ascii"
  15. Content-Transfer-Encoding: 7bit
  16. X-Status: 
  17. Status: RO
  18.  
  19. In a message of 20 Jul 94 GEORGAKAKIS,LOUIS,MR wrote to me:
  20.  
  21.  GLM> Can someone tell me why, when I write down this little program, it
  22.  GLM> doesn't do what I tell it to?  Here:
  23.  GLM> Print 5.7896
  24.  GLM> MouseWait
  25.  GLM> This should print out 5.7896 in a Shell window right? WRONG! It prints
  26.  GLM> out:
  27.  GLM> 5.789599
  28.  GLM> Why?  WHY!?
  29.  GLM> Sigh.
  30.  
  31.  
  32. Standart BlitzII is using a double precission var known as floats. That means,
  33. if you put none extention after the var, double precission var are used (.f).
  34. Double precission var have one big disadvantage. There are not quite exact in
  35. calculating numbers. But you can go from a range of +/-9*10^18, you have to deal
  36. with this big disadvantage. So, a solution to you prblem will be very simple.
  37. Try to use (.q) singe precission var known as quick. If you have enough with var
  38. going from a range +/-32768.0000. Plus they have a advantage to. they are only
  39. using 2 bytes of mem, so you win 2 bytes !
  40.  
  41. Try this
  42.  
  43. number.q=5.7896
  44. Print number.q
  45. MouseWait
  46.  
  47.  
  48.         _
  49.     /X\
  50.    // \\ -
  51.   (BLITZ) If you like the real world !
  52.    \\ // --
  53.     \X/ _
  54.  
  55. ... Yes ! This is Belguim calling. ;-)
  56.